<template>
  <div>
    <div class="card" style="width: 18rem;">
      <img :src="DetailPageList.images[0]" class="card-img-top" alt="...">
      <div class="card-body">
        <p class="card-text">{{ DetailPageList.author }}</p>
        <p class="card-text">{{ DetailPageList.category }}</p>
        <p class="card-text">{{ DetailPageList.content }}</p>
      </div>
    </div>
  </div>
</template>

<script>
import axios from "axios";
export default {
  name: "DetailPage",
  data() {
    return {
      DetailPageList: {},
    }
  },
  created() {
    const id = this.$route.params.id;
    axios({
      method: "GET",
      url: `https://gank.io/api/v2/post/${id}`,
    }).then((res) => {
      console.log(res);
      const { data } = res.data;
      this.DetailPageList = data;
    })
  }
}
</script>

<style scoped>

</style>